package com.house.framework.query;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ClassName BaseQuery
 * @Version 1.0
 */
@Data
public class BaseQuery {

    @ApiModelProperty("分页页码")
    @TableField(exist = false)
    private Integer pageIndex = 1;  // 当前页

    @ApiModelProperty("每页记录条数")
    @TableField(exist = false)
    private Integer pageSize = 5;   // 每页显示条数

    @ApiModelProperty("关键字")
    @TableField(exist = false)
    private String keyword;

    public Integer getBegin(){
        return (this.pageIndex-1) * this.pageSize;
    }
}
